package com.hgw.Demo06_CompositePattern.examples;

/**
 * Data time:2021/12/15 16:15
 * StudentID:2019112118
 * Author:hgw
 * Description:
 */
public class Leaf extends Component{
    @Override
    public void add(Component c) {
        // 异常处理或错误提示
    }

    @Override
    public void remove(Component c) {
        // 异常处理或错误提示
    }

    @Override
    public Component getChild(int i) {
        // 异常处理或错误提示
        return null;
    }

    @Override
    public void operation() {
        // 叶子构建具体业务方法的实现
    }
}
